<?php 
//商品分类列表的展示遍历
	include_once("./com.php");
error_reporting(E_ALL^E_NOTICE^E_WARNING);
date_default_timezone_set("PRC");
	$rem="select * from pc_fenlei";
	$ser=mysql_query($rem);
	while($res=mysql_fetch_assoc($ser)){
		$tre[]=$res;
	};

 ?>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>商品管理</title>
<base target="_self">
<link rel="stylesheet" type="text/css" href="skin/css/base.css" />
<link rel="stylesheet" type="text/css" href="skin/css/main.css" />
</head>
<body leftmargin="8" topmargin='8'>
<table width="98%" align="center" border="0" cellpadding="3" cellspacing="1" bgcolor="#CBD8AC" style="margin-bottom:8px;margin-top:8px;">
  <tr>
    <td background="skin/images/frame/wbg.gif" bgcolor="#EEF4EA" class='title' colspan="2"><span><img src='skin/images/frame/arr3.gif' style='margin-right:10px;'>商品分类管理</span></td>
  </tr>
   <tr>
    <td background="skin/images/frame/wbg.gif" bgcolor="#EEF4EA" class='title' colspan="2">
      <span style='margin-left:1020px;'><a href="product_cate_add.php">添加商品</a></span></td>
  </tr>
   <tr bgcolor="#FFFFFF">
    	 <td colspan="2">
    	 	<table width="98%" border="0" cellpadding="2" cellspacing="1" bgcolor="#CFCFCF" align="center" style="margin-top:8px">
    	 	<tr align="center" bgcolor="#FBFCE2" height="25">
    	 		<th>ID</th>
    	 		<th>商品分类名称</th>
    	 		<td>fid</td>
				<td>level</td>
    	 		<th>操作</th>
    	 	</tr>
    	 	<?php foreach ($tre as $value) { ?>
    	 		<tr align='center' bgcolor="#FFFFFF" height="26" align="center" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';">
    	 		 	
    	 		<td width="10%"><?= $value['pc_cid'] ?></td>
					<td width="50%">
            <?= str_repeat("&nbsp;",($value['pc_level']-1)*9). $value['pc_name'] ?>
          </td>
					<td width="10%"><?= $value['pc_fid'] ?></td>
					<td width="10%"><?= $value['pc_level'] ?></td>
					
					<td width="10%">
					<a href="product_cate_edit.php?pc_cid=<?= $value['pc_cid']?>"><img src='./skin/images/frame/trun.gif' title="编辑" alt="编辑" onClick="QuickEdit(179, event, this);" style='cursor:pointer' border='0' width='16' height='16' /></a>

					<a href="product_cate_del.php?pc_cid=<?= $value['pc_cid']?>"><img src='./skin/images/frame/gtk-del.png' title="删除" alt="删除" onClick="editArc(179);" style='cursor:pointer' border='0' width='16' height='16' /></a>
					</td>	
				</tr>
        <?php }?>
    	 	</table>
		</td>
	</tr>
  </tr>
</table>
</body>
</html>
